package com.dao;

import com.entity.Resource;
import com.vo.ResourceVo;
import org.apache.ibatis.annotations.Param;

import java.util.HashSet;
import java.util.List;

public interface ResourceDao {
    Resource selectResourceByID(@Param("resourceId") Integer resourceId);
    HashSet<Resource> selectResourceSetByChapterId(Integer chapterId);
    List<ResourceVo> findBackResource(ResourceVo resourceVo);
    void toggleStatus(Resource resource);
    Resource down(Integer id);
    int insertByResource(Resource resource);
    Resource selectPathById(int id);
    int selectClickCountById(int id);
    int updateClickCountById(@Param("id") int id,@Param("click_count") int click_count);
    int selectCountByTitle(String title);
    List<ResourceVo> findResourceByPageNo(@Param("resourceVo")ResourceVo resourceVo);
    List<ResourceVo> selectResourceByUserId(int user_id);
    int deleteResourceById(int id);
    int updateResource(Resource resource);
    void updateResourceStatusById(@Param("id")int id,@Param("status")int status);
}
